#pragma once
#include <string>

#define SINGLE_DEFINE(ClassName) private:\
static ClassName* s_pInst;\
public:\
~ClassName();\
static ClassName* GetInstance();


#define SINGLE_IMPLEMENT(ClassName) \
ClassName* ClassName::s_pInst = NULL; \
ClassName* ClassName::GetInstance()\
{\
	if(NULL == s_pInst)\
	{\
		s_pInst = new ClassName();\
	}\
	return s_pInst;\
}\
ClassName::~ClassName()\
{\
	if(s_pInst != NULL)\
	{\
		ClassName* pTemp = s_pInst;\
		s_pInst = NULL;\
		delete pTemp;\
	}\
}






